<?php include_once("DataProvider.php")?>
<?php ;
$snm=$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$id_danhmuc='0';
?>
<!doctype html>
<html class="no-js">
  <!-- InstanceBegin template="/Templates/loaisanpham.dwt.php" codeOutsideHTMLIsLocked="false" -->
  <?php
  include_once("header.php");
  ?>
  <!-- ENDS HEADER -->
  <!-- InstanceBeginEditable name="EditRegion1" -->
  <!-- MAIN -->
<body>
  <!--WRAPPER -->
  <div id="bigbox">
    <!--BEGIN: left-menu -->
    <div id="left-menu">
      <div>
        <div style="background-image:url(img/sub-bg.jpg);">
          <img  src="img/cacsanpham.png" width="165px" height="35"></div>

        <ul id="menuV2">
          <?php
    $td_lsp=DataProvider::layTatCaLoaiSanPham();
    while($row_1=mysql_fetch_array($td_lsp))
    {
    ?>
          <li>
            <a href="#">
              <?php echo $row_1['tenloaisanpham'];?></a>

            <?php
      $td_sp=DataProvider::laySanPhamTheoLoaiSanPham($row_1['id_loaisanpham']);
      if(mysql_num_rows($td_sp)>
            0)
    {
      ?>
            <ul>
              <?php
            while($row_2=mysql_fetch_array($td_sp))
      {
      ?>
              <li>
                <a href="detail.php?id=<?php echo $row_2['id_sanpham'];?>
                  ">
                  <?php echo $row_2['tensanpham'];?></a>
              </li>
              <?php
      }
      ?></ul>
            <?php
    }
   ?></li>
          <?php
    }
      ?></ul>
      </div>
      <div class="sub-widget">
        <?php
        $result=DataProvider::layTatCaTieuDeTinTuc();
        ?>
        <img  src="img/header-lienhe.png" width="165px" height="35" style="margin-bottom:10px;">
        <?php 
        if (mysql_num_rows($result)<=0) {
          echo "<p>Chua co tin moi</p>";
        }
        else
        {
        ?>
          <ul>
        <?php
          while($row_tintuc=mysql_fetch_array($result))
          {
        ?>
          <li><p><a href="tintuc.php?id=<?php echo $row_tintuc['id'];?>"><?php echo $row_tintuc['tieude'];?></a></p> </li>
        <?php 
        }
        ?>
        </ul>
        <?php
          }
        ?>
      </div>
      <div class="sub-widget">
        <img  src="img/header-lienhe.png" width="165px" height="35">
        <div style=" height:auto;padding-top:5px;line-height:20px;">Vui lòng liên hệ với chúng tôi qua:</div>
        <div style=" height:auto;padding-top:5px;line-height:20px;">-Email:<a href="mailto:sales@vn-pottery.net">sales@vn-pottery.net</a></div>
        <div style=" height:auto;padding-top:5px;line-height:20px;">-Điện thoại:84 909994092</div>
      </div>
      <div class="sub-widget">
        <img  src="img/header-thongke.png" width="165px" height="35">
        <div style="margin-left:10px; margin-top:10px;">
          <?php
            include "hitcounter.php";
            ?></div>
        <hr>
        <div style="margin-left:10px;">
          <?php
            include "counters.php";
            ?></div>
      </div>

    </div>
    <!--ENDS: left-menu -->
    <?php
                $sql="select * from sanpham sp where sp.id_sanpham=".$_REQUEST["id"];
              $result=DataProvider::ExecuteQuery($sql);
              $row=mysql_fetch_array($result);
?>
    <!--BEGIN: content-product -->
    <div id="detail-product">
      <div id="product-name">
        Chi tết cho sản phẩm
        <?php echo $row["tensanpham"];?></div>
      <div id="product-image">
        <a class="fancybox" href="img/sanpham/<?php echo trim($row["hinhsanpham"]);?>" data-fancybox-group="gallery" title="hinh1"><img width="400" height="400" src="img/sanpham/<?php echo trim($row["hinhsanpham"]);?>" alt="" /></a>
      </div>
      <!--Box Thong Tin SP-->
      <div id="product-info">
        <div class='header'>- Đặc tả:</div>
        <ul>
          <?php
              $sql2="select tenloaisanpham from loaisanpham lsp where lsp.id_loaisanpham=".$row["id_danhmuc"];
        $id_danhmuc=$row["id_danhmuc"];
              $result2=DataProvider::ExecuteQuery($sql2);
              $row2=mysql_fetch_array($result2);
?>
          <li >
            Mã Sản Phẩm:
            <?php echo $row["id_sanpham"];?></li>
          <li>
            Thuộc Loại:
            <?php echo $row2["tenloaisanpham"];?></li>
          <li>
            Kích Thước:
            <ul >
              <li >
                Size 1:
                <?php echo $row["l"];?>
                L
                <?php echo $row["w"];?>
                W
                <?php echo $row["h"];?>H</li>
              <li>
                Size 2:
                <?php echo $row["l"];?>
                L
                <?php echo $row["w"];?>
                W
                <?php echo $row["h"];?>H</li>
              <li>
                Size 3:
                <?php echo $row["l"];?>
                L
                <?php echo $row["w"];?>
                W
                <?php echo $row["h"];?>H</li>
            </ul>
          </li>
        </ul>
      </div>
      <!--END Box Thong Tin San Pham --> </div>
    <!--END: content-product -->
    <!--BEGIN: right-menu -->
    <div id="right-menu">
      <div class="sub-widget" style="margin-top:0px;">
        <img  src="img/header-tygiangoaite.png" width="175px" height="35">
        <br>
        <table style="font-size:14px;border:#FF9966 1px dashed; width:100%;" cellspacing="0" cellpadding="2">
          <tr>
            <td style=""> <strong>USD</strong>
              <br></td>
            <td>
              <script language="Javascript">document.write(vCosts[0]); //USD </script>
            </td>
          </tr>
          <tr>
            <td> <strong>GBP</strong>
            </td>
            <td>
              <script language="Javascript">document.write(vCosts[1]); //GBP </script>
            </td>
          </tr>
          <tr>
            <td>
              <strong>HKD</strong>
            </td>
            <td>
              <script language="Javascript">document.write(vCosts[2]); //HKD </script>
            </td>
          </tr>
          <tr>
            <td>
              <strong>CHF</strong>
            </td>
            <td>
              <script language="Javascript">document.write(vCosts[3]); //CHF </script>
            </td>
          </tr>
          <tr>
            <td>
              <strong>JPY</strong>
            </td>
            <td>
              <script language="Javascript">document.write(vCosts[4]); //JPY </script>
            </td>
          </tr>
          <tr>
            <td>
              <strong>AUD</strong>
            </td>
            <td>
              <script language="Javascript">document.write(vCosts[5]); //AUD </script>
            </td>
          </tr>
          <tr>
            <td>
              <strong>CAD</strong>
            </td>
            <td>
              <script language="Javascript">document.write(vCosts[6]); //CAD </script>
            </td>
          </tr>
          <tr>
            <td>
              <strong>SGD</strong>
            </td>
            <td>
              <script language="Javascript">document.write(vCosts[7]); //SGD </script>
            </td>
          </tr>
          <tr>
            <td>
              <strong>EUR</strong>
            </td>
            <td>
              <script language="Javascript">document.write(vCosts[8]); //EUR </script>
            </td>
          </tr>
          <tr>
            <td>
              <strong>NZD</strong>
            </td>
            <td>
              <script language="Javascript">document.write(vCosts[9]); //NZD </script>
            </td>
          </tr>
          <tr>
            <td>
              <strong>Bat Thái Lan</strong>
            </td>
            <td>
              <script language="Javascript">document.write(vCosts[10]); //Bat Thái Lan </script>
            </td>
          </tr>
        </table>
        <br>
      </div>
      <!--
      <div id="weather">
      <h4>Thông tin thời tiết</h4>
      <br>
      <ul>
        <li>
          <h4>Hà Nội</h4>
        </li>
        <script type="text/javascript">showWeather('hanoi, vietnam'); </script>
        <br>
        <li>
          <h4>Đà Nẵng</h4>
        </li>
        <script type="text/javascript">showWeather('danang, vietnam'); </script>
        <br>
        <li>
          <h4>TP Hồ Chí Minh</h4>
        </li>
        <script type="text/javascript">showWeather('hochiminh, vietnam'); </script>
      </ul>
    </div>
    -->
    <!-- BEGIN CBOX - www.cbox.ws - v001 -->
    <div  class="sub-widget" id="cboxdiv" style="text-align: center; line-height: 0">
      <div>
        <iframe frameborder="0" width="165" height="325" src="http://www4.cbox.ws/box/?boxid=4177884&amp;boxtag=586kh7&amp;sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain4-4177884" style="border:#FFFFFF 1px solid;" id="cboxmain4-4177884"></iframe>
      </div>
      <div>
        <iframe frameborder="0" width="165" height="75" src="http://www4.cbox.ws/box/?boxid=4177884&amp;boxtag=586kh7&amp;sec=form" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform4-4177884" style="border:#FFFFFF 1px solid;border-top:0px" id="cboxform4-4177884"></iframe>
      </div>
    </div>

    <!-- END CBOX --> </div>
</div>
<!--end: right-menu-->
</div>
<!-- ENDS WRAPPER -->

<div style="clear:both"></div>

<!-- ENDS MAIN -->
<!-- InstanceEndEditable -->
<!-- BEGINS FOOTER -->
<?php
include_once("footer.php");
?>
<!-- ENDS FOOTER -->

</body>

<!-- InstanceEnd -->

</html>